.template-carousel {
  width: 100%;
  padding: 20px 0;
  
  .carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    
    .title-section {
      h2 {
        font-size: 24px;
        margin: 0;
        color: #333;
      }
      
      p {
        font-size: 14px;
        color: #666;
        margin: 5px 0 0;
      }
    }
    
    .navigation-arrows {
      display: flex;
      gap: 10px;
      
      .arrow-btn {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        border: 1px solid #ddd;
        background: white;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        
        &:hover:not(.disabled) {
          background: #f5f5f5;
          border-color: #999;
        }
        
        &.disabled {
          opacity: 0.5;
          cursor: not-allowed;
        }
      }
    }
  }
  
  .carousel-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    
    .carousel-wrapper {
      display: flex;
      gap: 20px;
      transition: transform 0.3s ease-in-out;
    }
  }
  
  .template-item {
    flex: 0 0 240px;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    
    &:hover {
      transform: translateY(-5px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .template-image-container {
      position: relative;
      width: 100%;
      height: 320px;
      overflow: hidden;
      
      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
      }
      
      .h5-badge {
        position: absolute;
        bottom: 10px;
        left: 10px;
        background: rgba(0, 0, 0, 0.6);
        color: white;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 12px;
      }
      
      .video-badge {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 48px;
        height: 48px;
        background: rgba(0, 0, 0, 0.6);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        
        .play-icon {
          color: white;
          font-size: 20px;
        }
      }
      
      .hover-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        transition: opacity 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        
        &.active {
          opacity: 1;
        }
        
        .hover-content {
          display: flex;
          gap: 10px;
          
          button {
            padding: 8px 16px;
            border-radius: 4px;
            border: none;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s ease;
            
            &.preview-btn {
              background: white;
              color: #333;
              
              &:hover {
                background: #f5f5f5;
              }
            }
            
            &.use-btn {
              background: #1890ff;
              color: white;
              
              &:hover {
                background: #40a9ff;
              }
            }
          }
        }
      }
    }
    
    .template-info {
      padding: 12px;
      
      h3 {
        margin: 0;
        font-size: 14px;
        color: #333;
        line-height: 1.4;
        height: 40px;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
      }
      
      .template-meta {
        margin-top: 8px;
        display: flex;
        justify-content: space-between;
        font-size: 12px;
        color: #999;
        
        .author {
          color: #666;
        }
      }
    }
    
    // 长页面特殊样式
    &.longPage {
      .template-image-container {
        height: 400px;
        
        img {
          transition: transform 0.5s ease;
        }
        
        &:hover img {
          transform: translateY(-20px);
        }
      }
    }
    
    // H5特殊样式
    &.h5 {
      .template-image-container {
        &:hover {
          .hover-overlay {
            opacity: 1;
          }
        }
      }
    }
    
    // 视频特殊样式
    &.video {
      .template-image-container {
        &:hover {
          .video-badge {
            transform: translate(-50%, -50%) scale(1.1);
          }
        }
      }
    }
  }
} 